package com.study.prop.controller;

import com.study.prop.other.TestYml;
import com.study.prop.other.UserYml;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TestController {

    @Autowired
    private TestYml testYml;
    @Autowired
    private UserYml userYml;

    @GetMapping("/getUser")
    public String getUser(){
        return testYml.getName();
    }

    @GetMapping("/getAge")
    public Integer getAge(){
        return testYml.getAge();
    }

    @GetMapping("/getInfos")
    public List<UserYml.User> getInfos(){
        return userYml.getUser();
    }
}
